# 找出10000以内的完美数


def judge_perfect_num(num):
    match_list = []
    total = 0
    for x in range(1, num //2 +1):
        if num % x == 0:
            match_list.append(x)
    for y in match_list:
        total += y
    return total == num


if __name__ == "__main__":
    perfect_list = []
    for i in range(6, 10001):
        if judge_perfect_num(i):
            perfect_list.append(i)
    print(perfect_list)